<template>
<div>
    <h4 ref="countRef">{{count}}</h4>
    <button @click="btn" >按钮</button>
</div>
</template>

<script>
export default {
    data(){
        return{
            count:0
        }
    },
    methods:{
        btn(){
            this.count+=1
            this.$nextTick(()=>{
                console.log(this.$refs.countRef.innerHTML)
            })
        }
    }
}
</script>

<style>

</style>